---
title: Configuration.tee()
api: Configuration.tee
---

## Description

<Summary/>

<FilterDiagram
  name="tee"
  input="Event"
  output="Event"
/>

This filter resembles what the Unix command [tee](https://en.wikipedia.org/wiki/Tee_(command)) does. The pathname of the output file is specified in the first parameter. It is expected to be a string or a function that returns a string. Use `"-"` for writing to the standard output.

> When outputting to the standard output, this filter is different from [print()](/reference/api/Configuration/print) in that, the output does not go to the logging system so won't be visible on the _Admin GUI_.

The content of the output file will be erased before writing. If the output file does not exist yet, it will be created. The directories containing the file are also created if not exist. Make sure the process has required privileges to create and write to the file and the directories.

This filter passes everything down unaltered. It doesn't change anything in the event stream. Only [Data](/reference/api/Data) events are written to the output file as a continuous byte stream.

## Syntax

``` js
pipy()
  .pipeline()
  .tee(filename)

pipy()
  .pipeline()
  .tee(() => getFilename())
```

## Parameters

<Parameters/>

## See Also

* [Configuration](/reference/api/Configuration)
* [print()](/reference/api/Configuration/print)
* [read()](/reference/api/Configuration/read)
